1. Field of the Invention
The present invention relates to an electronic device for acquiring encoding speed information, and a method thereof. More particularly, the present invention relates to an electronic device for acquiring encoding speed information necessary for speed control using an encoder signal output from an encoder in an electronic device that uses the encoder, and a method for acquiring the speed information thereof.
2. Description of the Related Art
Generally, an encoder is a device that detects a driving speed of a motor and outputs it as an electrical signal. Either a linear encoder or a wheel encoder can be used according to the type of the electronic device. A pulse signal corresponding to channels A and B is generated from the encoder. The driving speed of the motor can then be acquired using the pulse signal corresponding to the channels A and B.
FIG. 1 is a view for illustrating a conventional method for acquiring speed information.
Referring to FIG. 1, the encoder signal output from the encoder is an electric pulse signal corresponding to the channels A and B and having the same period and a phase difference of 90 degrees. ‘Position’ in FIG. 1 denotes position information of a slit, which is the actual distance on the encoder.
In the related art, the number of clock signals counted from a falling edge or a rising edge to a next falling edge or a next rising edge of the encoder signal corresponding to the channel A or B is stored in a certain register. When a still next falling edge or rising edge is generated afterwards, the number of clock signals is counted again, thereby updating the value in the certain register.
An emitter interrupt signal is generated from the falling edge or the rising edge of the encoder signal. The updated value in the certain register is supplied as the speed information required for the control of an emitter interrupt routine. More specifically, referring to FIG. 1, a first count value (count 1) is used for the speed information, a second count value (count 2), which is updated, is used next for the speed information, and a third count value (count 3), which is further updated, is used still next for the speed information, and so forth.
Recently, as diverse functions have been added to the electronic devices using the encoder, a load applied to a main processor increases and the configuration complexity of the encoder is also increased. By this, the frequency of generating the emitter interrupt increases, thereby causing potential errors in acquiring the speed information. Accordingly, the electronic device may be controlled with inaccurate speed information, thereby deteriorating the control performance.
Accordingly, a need exists for a system and method for efficiently and effectively reducing errors caused when acquiring the speed information.